package com.javademo.maptest;

import lombok.extern.slf4j.Slf4j;

import java.util.LinkedHashMap;

@Slf4j
public class LinkedHashMapTest {
    public static void main(String[] args) {
        LinkedHashMap<String, String> map = new LinkedHashMap<>(8, 0.75f, true);
        putTest(map);
        log.info("map: {}", map);
        log.info("map2: {}", map.get("2"));
        log.info("map: {}", map);
    }

    private static void putTest(LinkedHashMap<String, String> map) {
        map.put("1", "a");
        map.put("2", "b");
        map.put("3", "c");
        map.put("4", "d");
        map.put("5", "e");
        map.put("6", "f");
        map.put("7", "g");
    }
}
